import { Button, Modal } from 'antd';
import React, { useState } from 'react';
import * as action from "../action"
import {useSelector,useDispatch } from "react-redux"
const App = ({delishow,closefn,delindex}) => {
  let dispatch = useDispatch()
  let store = useSelector(state=>({...state.tablereducer}))
  const [isModalOpen, setIsModalOpen] = useState(false);
  const showModal = () => {
    setIsModalOpen(true);
  };
  const handleOk = () => {
      dispatch(action.delfn(delindex))
    closefn(false)
  };
  const handleCancel = () => {
    closefn(false)
  };
  return (
    <>
     
      <Modal title="您确定要删除吗?" open={delishow} onOk={handleOk} onCancel={handleCancel}>
      </Modal>
    </>
  );
};
export default App;